import React, { Component } from 'react';
import myseckill from '../styles/myseckill.scss'
import pic12 from '../assets/MyEntryPic/12.gif'
import pic13 from '../assets/MyEntryPic/13.gif'
import pic14 from '../assets/MyEntryPic/14.gif'
import pic15 from '../assets/MyEntryPic/15.gif'
import pic16 from '../assets/MyEntryPic/16.gif'
import pic17 from '../assets/MyEntryPic/17.gif'

class MySeckill extends Component {
    constructor(props) {
        super(props);
        this.state = { //state中保存的值就是组件的状态
            list: [
                { pic: pic12, text1: '菲洛嘉柔', text2:'原价￥303',text3:'抢购价￥195'},
                { pic: pic13, text1: '倩碧', text2:'原价￥924',text3:'抢购价￥675'},
                { pic: pic14, text1: '海蓝之谜', text2:'原价￥2826',text3:'抢购价￥2543'},
                { pic: pic15, text1: 'Giorgio Armani', text2:'原价￥430',text3:'抢购价￥413'},
                { pic: pic16, text1: 'Panier Des', text2:'原价￥110',text3:'抢购价￥93'},
                { pic: pic17, text1: 'Ulike 蓝宝石', text2:'原价￥1749',text3:'抢购价￥1487'},
            ]
        }
    }
    render() {
        return (
            <div className='miaosha'>
                {
                    this.state.list.map((item, index) => {
                        return (
                            <div className="item" key={index}>
                                <img src={item.pic} alt="" />
                                <div className="text1">{item.text1}</div>
                                <div className="text2">{item.text2}</div>
                                <div className="text3">{item.text3}</div>
                            </div>
                        )
                    })
                }
            </div>
        );
    }
}

export default MySeckill;